package com.polaris.live.popup.party

import android.content.Context
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.common.ext.setOnSingleClickListener
import com.polaris.live.databinding.PopupUnlockSeatBinding

/**
 *  解锁座位弹窗
 * @author Created by 天晴 on 2024/3/8 19:18
 * @since 1.0.0
 **/
class UnLockSeatPopup(
    context: Context,
    private val onCloseLiveCallBack: () -> Unit
) : CenterPopupView(context) {
    private lateinit var mBinding: PopupUnlockSeatBinding
    override fun getImplLayoutId(): Int {
        return R.layout.popup_unlock_seat
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = PopupUnlockSeatBinding.bind(popupImplView)
        mBinding.cancel.setOnSingleClickListener {
            dismiss()
        }
        mBinding.closeLive.setOnSingleClickListener {
            dismiss()
            onCloseLiveCallBack.invoke()
        }
    }
}